package com.tianruan.dc.modules.userinfo.mapper;
import com.tianruan.dc.modules.sys.user.entity.dto.UserDTO;
import com.tianruan.dc.modules.userinfo.entity.Admin;
import com.tianruan.dc.modules.userinfo.entity.AdminPageDTO;
import com.tianruan.dc.modules.userinfo.entity.User;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;


public interface AdminMapper {


//    @Select("select t_sys_user.id,t_sys_user.name from t_sys_user where id= #{id}")
    AdminPageDTO getById(String id);

    void update(Admin admin);

    void setDelFlag(Admin id);

    List<AdminPageDTO> pageQuery(String name, String userName, String phone, String position,
                                 String deptId,String roleId,String status);

    @Select("select del_flag from t_sys_user where id= #{id}")
    String check(String id);

    @Select("select * from t_sys_user where id=#{id}")
    Boolean findAdmin(String id);

    @Select("select * from t_sys_user where id=#{id}")
    User find(String id);
    @Update("update t_sys_user set password=#{password} where id=#{id}")
    void updatePassword(String password,String id);

}

